(function () {
  return {
    "type": "page",
    "initApi": "/b/permits/init",
    "title": "参数配置",
    "body": {
      "type": "tabs",
      "mode": "line",
      "tabs": [
        {
          "title": "业主端首页排序",
          "body": {
            "type": "crud",
            "className": "break-all",
            "hideQuickSaveBtn": true,
            "api": "get:/b/params/index",
            // "quickSaveApi": "post:/b/params/batch",
            "quickSaveItemApi": "post:/b/params/item?id=$id",
            // "itemCheckableOn": "this.is_super !== 1 && this.leader_count === 0",
            "perPage": 10,
            "keepItemSelectionOnPageChange": true,
            "maxKeepItemSelectionLength": 20,
            "pageField": "page",
            "perPageField": "page_size",
            "labelTpl": "${name}",
            "syncLocation": false,
            "filter": {
              "title": "条件搜索",
              "submitText": "搜索",
              "controls": [
                {
                  "label": "栏目名称：",
                  "type": "text",
                  "size": "sm",
                  "name": "name",
                  "placeholder": "请输入"
                }
              ],
              "actions": [
                {
                  "type": "button",
                  "actionType": "clear",
                  "label": "重置"
                },
                {
                  "type": "button",
                  "actionType": "submit",
                  "label": "搜索",
                  "level": "primary",
                }
              ]
            },
            "bulkActions": [
              // {
              //   "label": "批量删除",
              //   "visibleOn": "isInArray(this.front_end, 'admin_list_delete')",
              //   "level": "danger",
              //   "actionType": "ajax",
              //   "api": "post:/b/admin/del/${ids|raw}",
              //   "confirmText": "确定要批量删除?"
              // }
            ],
            "filterTogglable": true,
            "headerToolbar": [
              "filter-toggler",
              "bulkActions",
              {
                "type": "columns-toggler",
                "align": "right"
              },
              {
                "type": "pagination",
                "align": "right"
              }
            ],
            "footerToolbar": [
              "statistics",
              "switch-per-page",
              "pagination"
            ],
            "columns": [
              {
                "name": "id",
                "label": "ID",
                "hidden": true,
                "sortable": true,
                "type": "text",
                "toggled": true
              },
              {
                "name": "name",
                "label": "栏目名称",
                "sortable": false,
                "searchable": false,
                "type": "text",
                "toggled": true,
              },
              {
                "name": "sort",
                "label": "排序",
                "sortable": false,
                "searchable": false,
                "type": "text",
                "toggled": true,
                "quickEdit": {
                  "type": "text",
                  "saveImmediately": true
                },
                // "quickEditEnabledOn": "isInArray(this.front_end, 'admin_list_update')",
              },
              {
                "name": "state",
                "width": 50,
                "type": "switch",
                "label": "禁用/启用",
                "trueValue": 1,
                "falseValue": 2,
                "quickEdit": {
                  "type": "switch",
                  "trueValue": 1,
                  "falseValue": 2,
                  "mode": "inline",
                  "saveImmediately": true,
                },
              },
              {
                "name": "creator",
                "label": "创建人",
                "type": "text",
                "sortable": false,
                "toggled": true
              },
            ]
          }
        },
        {
          "title": "提醒设置",
          "body": {
            "type": "form",
            // "debug": true,
            "title": "提醒设置",
            "initApi": "get:/b/content/read?type=5",
            "name": "提醒设置",
            "mode": "horizontal",
            "horizontal": {
              "left": 3,
              "right": 9,
              "offset": 2
            },
            "api": "post:/b/content/save",
            "controls": [
              {
                "type": "hidden",
                "name": "content_type",
                "value": 2
              },
              {
                "type": "hidden",
                "name": "type",
                "value": 5
              },
              {
                "type": "fieldSet",
                "title": "提醒规则",
                "headingClassName": "bg-gray-100",
                "body": [
                  {
                    "type": "divider"
                  },
                  {
                    "name": "content['air_remind']",
                    "label": "通风除尘提醒每月",
                    "type": "input-text",
                    "size": "lg",
                    "validateOnChange": true,
                    "validations": {
                      "isInt": true,
                      "minimum": 1,
                      "maximum": 31,
                    },
                    "suffix": "日进行提醒",
                    "remark": "如果选择为29、30、31日、日历月份不存在则不会进行提醒"
                  },
                  {
                    "name": "content['return_start_days']",
                    "label": "业主回家开始提前",
                    "type": "input-text",
                    "size": "lg",
                    "validateOnChange": true,
                    "validations": {
                      "isInt": true,
                      "minimum": 1,
                    },
                    "suffix": "天进行提醒"
                  },
                  {
                    "name": "content['return_end_days']",
                    "label": "业主回家结束提前",
                    "type": "input-text",
                    "size": "lg",
                    "validateOnChange": true,
                    "validations": {
                      "isInt": true,
                      "minimum": 1,
                    },
                    "suffix": "天进行提醒"
                  },
                ]
              },
              {
                "type": "fieldSet",
                "title": "消息通知人设置",
                "headingClassName": "bg-gray-100",
                "body": [
                  {
                    "type": "divider"
                  },
                  {
                    "label": "返程预约通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['return_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                  {
                    "label": "接送预约通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['pick_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                  {
                    "label": "提现申请通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['cash_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                  {
                    "label": "房间清扫通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['cleaning_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                  {
                    "label": "合约到期通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['contract_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                  {
                    "label": "未通风除尘通知接收人",
                    "type": "select",
                    "size": "lg",
                    "name": "content['air_admin_ids']",
                    "multiple": true,
                    "searchable": true,
                    "placeholder": "请选择",
                    "source": "get:/b/admin/options"
                  },
                ]
              },
            ]
          }
        },
        {
          "title": "提现设置",
          "body": {
            "type": "form",
            // "debug": true,
            "title": "提现设置",
            "initApi": "get:/b/content/read?type=4",
            "name": "提现设置",
            "mode": "horizontal",
            "horizontal": {
              "left": 3,
              "right": 9,
              "offset": 2
            },
            "api": "post:/b/content/save",
            "controls": [
              {
                "type": "hidden",
                "name": "content_type",
                "value": 2
              },
              {
                "type": "hidden",
                "name": "type",
                "value": 4
              },
              {
                "type": "combo",
                "name": "content",
                "label": "提现日",
                "multiple": true,
                "flat": true,
                "size": "lg",
                "remark": "如果选择为29、30、31日、日历月份不存在则无法进行提现",
                "items": [
                  {
                    "name": "cash_day",
                    "label": "提现时间每月",
                    "unique": true,
                    "type": "input-text",
                    "size": "lg",
                    "validateOnChange": true,
                    "validations": {
                      "isInt": true,
                      "minimum": 1,
                      "maximum": 31,
                    },
                    "addOn": {
                      "type": "text",
                      "label": "日"
                    },
                    "required": true
                  },
                ]
              },
            ]
          }
        },
        {
          "title": "客服热线",
          "body": {
            "type": "form",
            // "debug": true,
            "title": "客服热线",
            "initApi": "get:/b/content/read?type=2",
            "name": "客服热线",
            "mode": "horizontal",
            "horizontal": {
              "left": 3,
              "right": 9,
              "offset": 2
            },
            "api": "post:/b/content/save",
            "controls": [
              {
                "type": "hidden",
                "name": "content_type",
                "value": 2
              },
              {
                "type": "hidden",
                "name": "type",
                "value": 2
              },
              {
                "type": "text",
                "size": "lg",
                "name": "content['custom_mobile']",
                "label": "客服热线",
                "required": true
              },
            ]
          }
        },
        {
          "title": "消息通知",
          "body": {
            "type": "form",
            // "debug": true,
            "title": "消息通知",
            "initApi": "get:/b/content/read?type=3",
            "name": "消息通知",
            "mode": "horizontal",
            "horizontal": {
              "left": 3,
              "right": 9,
              "offset": 2
            },
            "api": "post:/b/content/save",
            "controls": [
              {
                "type": "hidden",
                "name": "content_type",
                "value": 2
              },
              {
                "type": "hidden",
                "name": "type",
                "value": 3
              },
              {
                "type": "text",
                "size": "lg",
                "name": "content['notice_url']",
                "label": "消息通知",
                "required": true
              },
            ]
          }
        },
      ]
    }
  };
})();